import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';

import { PhotoComponent } from './photo.component';
import { DeviceListComponent } from './device/list.component';
import { OrderListComponent } from './order/list.component';
import { PayListComponent } from './pay/list.component';
import { LoginListComponent } from './login/list.component';

@NgModule({
    imports: [RouterModule.forChild([
        { path: '', redirectTo: 'device', pathMatch: 'full'},
        {
            path: '',
            component: PhotoComponent,
            children: [
                {
                    path: 'device',
                    component: DeviceListComponent
                },
                {
                    path: 'order',
                    component: OrderListComponent
                },
                {
                    path: 'pay',
                    component: PayListComponent
                },
                {
                    path: 'userlogin',
                    component: LoginListComponent
                }
            ]
        }
    ])],
    exports: [RouterModule]
})
export class PhotoRoutingModule { }
